home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v10n11.arc / RELATE.PRG < prev    next >
Text File  |  1991-05-10  |  1KB  |  67 lines

  1. *
  2. * RELATE.PRG
  3. *
  4. * This program illustrates whether or not your dBASE
  5. * implementation respects the SET DELETED ON setting
  6. * when using SET RELATION
  7. *
  8. * The sample databases CLIENT and TRANSACT can be downloaded
  9. * from PC-MagNet
  10. *
  11. SET TALK OFF
  12. SET ECHO OFF
  13. SET ALTE TO TEST          && Results saved in TEST.TXT
  14. SET ALTE ON
  15. ?
  16. ? VERSION()
  17. ?
  18. SET DELETED OFF           && First try with SET DELETED OFF
  19. SELE 1
  20. USE client INDEX client_id
  21. SELE 2
  22. USE transact
  23. SET RELATION TO client_id INTO client
  24. GO 1
  25. SELE 1
  26. DELETE                    && Delete the record
  27. SELE 2
  28. ?
  29. ? '1. EOF should be false -- '
  30. ? '   EOF()=',EOF()
  31. ? '   CLIENT name should appear -- '
  32. ? '   CLIENT->CLIENT='+CLIENT->CLIENT
  33. ?
  34. SELE 1
  35. ?
  36. ? '2. EOF should be false -- '
  37. ? '   EOF()=',EOF()
  38. ?
  39. *
  40. * Now try the same thing with SET DELETED ON
  41. *
  42. SET DELETED ON            && Now try with SET DELETED ON
  43. SELE 1
  44. USE client INDEX client_id
  45. SELE 2
  46. USE transact
  47. SET RELATION TO client_id INTO client
  48. GO 1
  49. SELE 1
  50. DELETE                    && Make sure it's deleted
  51. SELE 2
  52. ?
  53. ? '3. EOF should be false -- '
  54. ? '   EOF()=',EOF()
  55. ? '   CLIENT name should be blank -- '
  56. ? '   CLIENT->CLIENT='+CLIENT->CLIENT
  57. ?
  58. SELE 1
  59. ?
  60. ? '4. EOF should be true -- '
  61. ? '   EOF()=',EOF()
  62. ?
  63. ?
  64. SET ALTE TO
  65. RETURN
  66.  
  67.